package com.binyuan.move.thried;



import com.binyuan.move.utils.MoveUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;

public class CompressThreads implements Runnable {


    private Logger log = LoggerFactory.getLogger(CompressThreads.class);
   private File source;
   private  String picName;

    public CompressThreads() {
    }

    public CompressThreads(String fileName, String picName) {
        this.source = new File(fileName);
        this.picName = picName;
    }

    @Override
    public void run() {
        try {
            MoveUtils.compressionVideo(source,picName);
        }catch (Exception e){
            log.info("压缩失败");
            e.printStackTrace();
        }finally {
            source = null;
            picName = null;
        }
    }
}
